package com.zby.lease.model.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.dromara.autotable.annotation.AutoColumn;
import org.dromara.autotable.annotation.PrimaryKey;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;

import java.io.Serializable;
import java.util.Date;
// BaseEntity 基础实体
@Data
public class BaseEntity implements Serializable {
    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    @PrimaryKey
    private Long  id;
    @Schema(description = "创建时间")
    @JsonIgnore
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    @Schema(description = "修改时间")
    @JsonIgnore
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    @Schema(description = "是否删除")
    @JsonIgnore
    @TableLogic
    @TableField(value = "is_deleted")
    @AutoColumn(type = MysqlTypeConstant.BIT)
    private Byte isDeleted;



}
